/*	Testing the functionality of assignment in m. */

void main()
{
	int x;
	int a;
	int b;
	note n;
	
	//Assigning literals
	print(x=1);				//assigning to a variable
	print(x);
	print(n.pitch = 42);	//assigning to a member
	print(n.pitch);
	
	//Assigning variables
	print(a=x);
	
	//Assigning members
	print(x = n.pitch);
	
	//Successive assignment
	print(b = a = n.pitch = x = 13);
	print(a);
	print(n.pitch);
	print(x);
	
	//Testing additional assignment operators
	print(x += 1);
	print(x++);	//++ is equivalent to x += 1;
	print(x -= 1);
	print(x--);	//-- is equivalent to x -= 1;
	print(x *= 10);
	print(x /= 2);
	print(x %= 2);
	
	//Self-assignment
	print(x = x);
}